<ui:composition
 xmlns="http://www.w3.org/1999/xhtml"
 xmlns:ui="http://java.sun.com/jsf/facelets"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:rich="http://richfaces.org/rich">
 <rich:panel id="panierSummary" styleClass="pan" style="background-color:#C0D9D9;width:100%">
  
  <h:panelGroup rendered="#{!boutiqueBacking.panierVide}">
  <b><h:commandLink   action="#{boutiqueBacking.link2panier}"  immediate="true">
   <h:graphicImage name="16/cart.png" library="icons" style="border:0; margin-right:5px" />
  <h:outputText value="#{strings['Order.voirpanier']}" />
  </h:commandLink></b><br/><br/>
  </h:panelGroup>
   <rich:dataTable   value="#{boutiqueBacking.listPanier}"   var="item" rendered="#{!boutiqueBacking.panierVide}" style="border:none;width:100%">
   <!-- 
   <f:facet name="header"><b><h:commandLink   action="#{boutiqueBacking.link2panier}"  immediate="true"><h:outputText value="Panier" /></h:commandLink></b></f:facet>
   -->
  <h:column style="background-color:#C0D9D9;border:none">
	<h:commandLink   action="#{boutiqueBacking.retirerPanier(item.book.id)}"  immediate="true"><h:graphicImage name="16/remove-icon.png" library="icons" style="border:0" /></h:commandLink>
    	<h:commandLink   action="#{boutiqueBacking.addPanier(item.book.id)}"  immediate="true"><h:graphicImage name="16/add-icon.png" library="icons" style="border:0" /></h:commandLink>
	<h:outputText value="           " style="font-size:1.5em"/>
	<h:commandLink
    action="#{boutiqueBacking.selectBook(item.book.id)}"
    immediate="true">
    
    <h:outputText value="#{item.book.title}" style="font-size:1.5em"/>
     </h:commandLink>
    
     <h:outputText value="     x" /><h:outputText value="#{item.quantity}" />   
  </h:column>
  </rich:dataTable>
  
  <h:panelGroup rendered="#{!boutiqueBacking.panierVide}">
  <br/>
    <h:commandLink action="#{boutiqueBacking.validerCommande}"  immediate="true" rendered="#{boutiqueBacking.connecte}">
  	<h:graphicImage name="16/check.png" library="icons" style="border:0; margin-right:5px" />
  	<h:outputText value="#{strings['Commande.validercommande']}" /><br/>
  </h:commandLink>
  <h:commandLink action="#{boutiqueBacking.viderPanier}"  immediate="true">
  <h:graphicImage name="16/no.png" library="icons" style="border:0; margin-right:5px" />
  	<h:outputText value="#{strings['Commande.viderpanier']}" />
  </h:commandLink>
  <br/>
  <br/>
  <h:outputText value="Total : " />
  <h:outputText value="#{boutiqueBacking.panier.total}" />
  <h:outputText value=" &#8364;" />
  </h:panelGroup>
  
  
  <h:panelGroup rendered="#{boutiqueBacking.panierVide}">
  <b><h:commandLink   action="#{boutiqueBacking.link2panier}"  immediate="true">
  <h:graphicImage name="16/cart.png" library="icons" style="border:0; margin-right:5px" />
  <h:outputText value="#{strings['Commande.paniervide']}" /></h:commandLink></b><br/>
  
  </h:panelGroup>
  </rich:panel>
</ui:composition>
